import { Prop, Schema, SchemaFactory } from '@nestjs/mongoose';
import { HydratedDocument } from 'mongoose';

export type SSDInfoDocumentType = HydratedDocument<SSD_Info>;

@Schema()
export class SSD_Info {
  @Prop({ required: true, index: true })
  manufacturers: string;
  @Prop({ required: true, index: true })
  capacity: string;
  @Prop({ required: true, index: true })
  interfaceType: string;
  @Prop({ required: true, index: true })
  r_speed: string;
  @Prop({ required: true, index: true })
  w_speed: string;
  @Prop({ required: true, index: true })
  price: number;
  @Prop({ required: true, index: true })
  img_url_arr: string[];
  @Prop({ required: true })
  score: number; // 性能评分
}

export const SSD_InfoSchema = SchemaFactory.createForClass(SSD_Info);
